using card_makerWeb;
using card_makerWeb.Service;
using CardMaker.Library.Services;
using CardMaker.Services;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.Services.AddBootstrapBlazor();
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services
    .AddScoped<ICardTemplateStorage, CardTemplateStorage>();
builder.Services.AddScoped<IPreferenceStorage, PreferenceStorage>();
builder.Services.AddScoped<ILocalImageService, LocalImageService>();
builder.Services.AddScoped<ISideImageStorage, SideImageStorage>();
builder.Services
    .AddScoped<ICardTemplateService, CardTemplateService>();
builder.Services.AddScoped<ICardImageToUrlService, CardImageToUrlService>();

await builder.Build().RunAsync();
void ConfigureServices(IServiceCollection services) { services.AddScoped<ImageStateService>(); }